package com.kma.summer2012.client.events.manager;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.kma.summer2012.shared.model.UICrumbsRequest;

public class EditPageEventManager extends GwtEvent<EditPageEventManager.EditPageEventManagerHandler> {
    public static GwtEvent.Type<EditPageEventManagerHandler> TYPE = new GwtEvent.Type<EditPageEventManagerHandler>();

    private UICrumbsRequest request;

    public EditPageEventManager() {

    }

    public EditPageEventManager(UICrumbsRequest req) {
        request = req;

    }

    public interface EditPageEventManagerHandler extends EventHandler {
        void onEditPageEvent(EditPageEventManager event, UICrumbsRequest request);
    }

    @Override
    public Type<EditPageEventManagerHandler> getAssociatedType() {
        return TYPE;
    }


    public static Type<EditPageEventManagerHandler> getType() {
        return TYPE;
    }

    protected void dispatch(EditPageEventManagerHandler handler) {
        handler.onEditPageEvent(this, request);
    }


}

